/*
 * Josh Lindoo
 * Login ID : lind6441
 * CS-102, Winter 2013
 * Programming Assignment 2
 * Node class: Used to generate nodes for a linked list
 */

public class MovieNode {
	private Movie data; //data
	private MovieNode next; //link to next node
	private ShowingList showings = new ShowingList(); //LL of showings for this movie
	
	/**
	 * Default constructor
	 */
	public MovieNode() {
		data = null;
		next = null;
	}
	
	/**
	 * Constructor
	 * @param item	data item
	 */
	public MovieNode(Movie item) {
		setData(item);
		next = null;
	}
	
	/**
	 * Accessor for data
	 * @return data
	 */
	public Movie getData() {
		return data;
	}
	
	/**
	 * Accessor for next
	 * @return next
	 */
	public MovieNode getNext() {
		return next;
	}
	
	public ShowingNode getShowings() {
		return showings.getHead();
	}
	
	public ShowingList getShowList() {
		return showings;
	}
	
	/**
	 * Mutator for data
	 * @param item	Item to be stored in data
	 */
	public void setData(Movie item) {
		this.data = item;
	}
	
	/**
	 * Mutator for next
	 * @param next	Reference to next node
	 */
	public void setNext(MovieNode next) {
		this.next = next;
	}
	
}
